import { post } from "@/util/request";

/**
 * @description 首页相关API
 */
const TimeCountAPI = async ({
    url = "/home-api/getTimeCount",
    params = Object,
    success = Function,
    error = Function,
    complete = Function,
}) => {
    try {
        const  res = await post(url, {
            ...params
        })
        
        console.log("查询时间总长结果：", res)
        if (res.status === "0000") {
            success(res.data);
        } else {
            error(res)
        }

    } catch (error) {
        console.log("网络请求错误",error)
        error(error)
    } finally {
        complete()
    }
}
export {
    TimeCountAPI
}